Don't save deleted records into data_store if mvcc is not enabled on RangePartition #104
Don't save deleted records into data_store if mvcc is not enabled on RangePartition #104
Conversation
WalkthroughThe client removed an unused per-partition counter, added an MVCC-enabled check during range-partition batching, and changed delete handling to emit DELETE when MVCC is off. Separately, a RocksDB scan debug log line was commented out, with no control-flow modifications. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant Client as DataStoreServiceClient
participant Sharder as txservice::Sharder
participant Store as DataStore
Caller->>Client: PrepareRangePartitionBatches(records)
Client->>Sharder: GetLocalCcShards().EnableMvcc()
Sharder-->>Client: mvccEnabled (bool)
loop For each record
alt record.markedDeleted
alt mvccEnabled == false
Note over Client: Choose DELETE for delete-marked record
Client->>Store: Write(DELETE, key)
else mvccEnabled == true
Note over Client: Use PUT to honor MVCC tombstoning
Client->>Store: Write(PUT, key, value)
end
else not deleted
Client->>Store: Write(PUT, key, value)
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🔇 Additional comments (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Related PR:
eloqdata/eloqsql#136
eloqdata/eloqdoc#231
eloqdata/eloqkv#215
Summary by CodeRabbit